<template>
	<view class="min100 plr-30 bg gray-2 pb-100 pt-40">
		<!-- 列表 -->
		<empty v-if="list.length==0"></empty>
		<view v-else class="flex flex-wrap flex-between" style="width:100%">
			<view v-for="(item,index) in list" :key="index" class="collectItem">
				<view class="bg radius-40 mb-30 size-22">
					<image class="collectImg radius-40" :src="item.image"></image>
					<view class="plr-30 ptb-30 white">
						<view class="flex flex-start">
							<view class="size-34">
								{{item.name}}
							</view>
							<!-- <image src="../../static/homeIcon.png" class="homeIcon ml-20" mode=""></image> -->
						</view>
						<view class="flex flex-between mtb-20  size-30 ">
							<view>
								价值￥<text>{{item.price}}</text>
							</view>
							<view>
								×<text>{{item.count}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import empty from "../../components/empty.vue"
	export default {
		components: {
			empty
		},
		data() {
			return {
				list: []
			}
		},
		onShow() {
			this.init();
		},
		methods: {
			// 头部按钮
			onNavigationBarButtonTap() {
				uni.navigateTo({
					url: '../my/myChip'
				})
			},
			init() {
				this.$http('api/forge/userForgeList').then(res => {
					this.list = res;
				})
			},

		}
	}
</script>
<style lang="less" scoped>
	.homeImg {
		width: 284rpx;
		height: 60rpx;
	}

	.collectItem {
		width:330rpx;
	}

	.collectImg {
		width: 330rpx;
		height: 330rpx;
	}

	.homeIcon {
		width: 30rpx;
		height: 30rpx;
	}

	.tipsLeft {
		background: #44ACFF;
		color: #2f2f2e;
	}

	.tipsRight {
		background: rgba(239, 170, 28, .3);
	}
</style>
